<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title> Recherche </title>
	<link rel="stylesheet" type="text/css" href="${facesContext.externalContext.requestContextPath}/resource/css/Style.css" /> 
</h:head>
<h:body>
	<ui:include src="entete.xhtml" />
	
		
		<h:dataTable width = "100%" value="#{beanRecherche1.LFilms}" var="film">
			<h:column>
				<p:panel id="horizontal" header="#{film.titre}" toggleable="true" toggleOrientation="horizontal">
        			<h:panelGrid columns="2" cellpadding="10">
        				<h:form>
							<h:commandLink disabled="#{beanRecherche1.valide}" action="/securite/AffichageFilm.xhtml"   styleClass="text" >
								<f:setPropertyActionListener value="#{film}" target="#{beansFilm.film}" />
								<h:graphicImage value="#{film.lien_photo}" width="300" />
							</h:commandLink>
						</h:form>
						<h:panelGroup>
							<h:outputLabel value="Genre : #{film.genre}" styleClass="text"/>
							<br/>
							<h:outputLabel value="Date de sortie : " styleClass="text" />
							<h:outputLabel value ="#{film.annee_sortie}" styleClass="text">
								<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
							</h:outputLabel>
						</h:panelGroup>   			
        			</h:panelGrid>
    			</p:panel>
			</h:column>
	   </h:dataTable>
	   
	   <h:dataTable width = "100%" value="#{beanRecherche1.LPersonne}" var="personne">
			<h:column>
				<p:panel id="horizontal" header="#{personne.nom} #{personne.prenom}" toggleable="true" toggleOrientation="horizontal">
        			<h:panelGrid columns="2" cellpadding="10">
        				<h:form>
							<h:commandLink disabled="#{beanRecherche1.valide}" action="/AffichageArtiste.xhtml"   styleClass="text" >
								<f:setPropertyActionListener value="#{personne}" target="#{beanArtiste.personne}" />
								<h:graphicImage value="#{personne.lien_photo}" width="300" />
							</h:commandLink>
						</h:form>
						<h:panelGroup>
							<h:outputLabel value="Popularité : #{personne.nbrCliques}" styleClass="text"/>
						</h:panelGroup>   			
        			</h:panelGrid>
    			</p:panel>
			</h:column>
	   </h:dataTable>
	
	<ui:include src="Pied.xhtml"/>
</h:body>
</html>